{"ast":null,"code":"var __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport EyeInvisibleOutlined from \"@ant-design/icons/es/icons/EyeInvisibleOutlined\";\nimport EyeOutlined from \"@ant-design/icons/es/icons/EyeOutlined\";\nimport classNames from 'classnames';\nimport omit from \"rc-util/es/omit\";\nimport { composeRef } from \"rc-util/es/ref\";\nimport * as React from 'react';\nimport { useRef, useState } from 'react';\nimport { ConfigContext } from '../config-provider';\nimport useRemovePasswordTimeout from './hooks/useRemovePasswordTimeout';\nimport Input from './Input';\nconst defaultIconRender = visible => visible ? /*#__PURE__*/React.createElement(EyeOutlined, null) : /*#__PURE__*/React.createElement(EyeInvisibleOutlined, null);\nconst ActionMap = {\n  click: 'onClick',\n  hover: 'onMouseOver'\n};\nconst Password = /*#__PURE__*/React.forwardRef((props, ref) => {\n  const {\n    visibilityToggle = true\n  } = props;\n  const visibilityControlled = typeof visibilityToggle === 'object' && visibilityToggle.visible !== undefined;\n  const [visible, setVisible] = useState(() => visibilityControlled ? visibilityToggle.visible : false);\n  const inputRef = useRef(null);\n  React.useEffect(() => {\n    if (visibilityControlled) {\n      setVisible(visibilityToggle.visible);\n    }\n  }, [visibilityControlled, visibilityToggle]);\n  // Remove Password value\n  const removePasswordTimeout = useRemovePasswordTimeout(inputRef);\n  const onVisibleChange = () => {\n    const {\n      disabled\n    } = props;\n    if (disabled) {\n      return;\n    }\n    if (visible) {\n      removePasswordTimeout();\n    }\n    setVisible(prevState => {\n      var _a;\n      const newState = !prevState;\n      if (typeof visibilityToggle === 'object') {\n        (_a = visibilityToggle.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(visibilityToggle, newState);\n      }\n      return newState;\n    });\n  };\n  const getIcon = prefixCls => {\n    const {\n      action = 'click',\n      iconRender = defaultIconRender\n    } = props;\n    const iconTrigger = ActionMap[action] || '';\n    const icon = iconRender(visible);\n    const iconProps = {\n      [iconTrigger]: onVisibleChange,\n      className: `${prefixCls}-icon`,\n      key: 'passwordIcon',\n      onMouseDown: e => {\n        // Prevent focused state lost\n        // https://github.com/ant-design/ant-design/issues/15173\n        e.preventDefault();\n      },\n      onMouseUp: e => {\n        // Prevent caret position change\n        // https://github.com/ant-design/ant-design/issues/23524\n        e.preventDefault();\n      }\n    };\n    return /*#__PURE__*/React.cloneElement( /*#__PURE__*/React.isValidElement(icon) ? icon : /*#__PURE__*/React.createElement(\"span\", null, icon), iconProps);\n  };\n  const {\n      className,\n      prefixCls: customizePrefixCls,\n      inputPrefixCls: customizeInputPrefixCls,\n      size\n    } = props,\n    restProps = __rest(props, [\"className\", \"prefixCls\", \"inputPrefixCls\", \"size\"]);\n  const {\n    getPrefixCls\n  } = React.useContext(ConfigContext);\n  const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);\n  const prefixCls = getPrefixCls('input-password', customizePrefixCls);\n  const suffixIcon = visibilityToggle && getIcon(prefixCls);\n  const inputClassName = classNames(prefixCls, className, {\n    [`${prefixCls}-${size}`]: !!size\n  });\n  const omittedProps = Object.assign(Object.assign({}, omit(restProps, ['suffix', 'iconRender', 'visibilityToggle'])), {\n    type: visible ? 'text' : 'password',\n    className: inputClassName,\n    prefixCls: inputPrefixCls,\n    suffix: suffixIcon\n  });\n  if (size) {\n    omittedProps.size = size;\n  }\n  return /*#__PURE__*/React.createElement(Input, Object.assign({\n    ref: composeRef(ref, inputRef)\n  }, omittedProps));\n});\nif (process.env.NODE_ENV !== 'production') {\n  Password.displayName = 'Password';\n}\nexport default Password;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","EyeInvisibleOutlined","EyeOutlined","classNames","omit","composeRef","React","useRef","useState","ConfigContext","useRemovePasswordTimeout","Input","defaultIconRender","visible","createElement","ActionMap","click","hover","Password","forwardRef","props","ref","visibilityToggle","visibilityControlled","undefined","setVisible","inputRef","useEffect","removePasswordTimeout","onVisibleChange","disabled","prevState","_a","newState","getIcon","prefixCls","action","iconRender","iconTrigger","icon","iconProps","className","key","onMouseDown","preventDefault","onMouseUp","cloneElement","isValidElement","customizePrefixCls","inputPrefixCls","customizeInputPrefixCls","size","restProps","getPrefixCls","useContext","suffixIcon","inputClassName","omittedProps","assign","type","suffix","process","env","NODE_ENV","displayName"],"sources":["/data/messenger.client/node_modules/antd/es/input/Password.js"],"sourcesContent":["var __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport EyeInvisibleOutlined from \"@ant-design/icons/es/icons/EyeInvisibleOutlined\";\nimport EyeOutlined from \"@ant-design/icons/es/icons/EyeOutlined\";\nimport classNames from 'classnames';\nimport omit from \"rc-util/es/omit\";\nimport { composeRef } from \"rc-util/es/ref\";\nimport * as React from 'react';\nimport { useRef, useState } from 'react';\nimport { ConfigContext } from '../config-provider';\nimport useRemovePasswordTimeout from './hooks/useRemovePasswordTimeout';\nimport Input from './Input';\nconst defaultIconRender = visible => visible ? /*#__PURE__*/React.createElement(EyeOutlined, null) : /*#__PURE__*/React.createElement(EyeInvisibleOutlined, null);\nconst ActionMap = {\n  click: 'onClick',\n  hover: 'onMouseOver'\n};\nconst Password = /*#__PURE__*/React.forwardRef((props, ref) => {\n  const {\n    visibilityToggle = true\n  } = props;\n  const visibilityControlled = typeof visibilityToggle === 'object' && visibilityToggle.visible !== undefined;\n  const [visible, setVisible] = useState(() => visibilityControlled ? visibilityToggle.visible : false);\n  const inputRef = useRef(null);\n  React.useEffect(() => {\n    if (visibilityControlled) {\n      setVisible(visibilityToggle.visible);\n    }\n  }, [visibilityControlled, visibilityToggle]);\n  // Remove Password value\n  const removePasswordTimeout = useRemovePasswordTimeout(inputRef);\n  const onVisibleChange = () => {\n    const {\n      disabled\n    } = props;\n    if (disabled) {\n      return;\n    }\n    if (visible) {\n      removePasswordTimeout();\n    }\n    setVisible(prevState => {\n      var _a;\n      const newState = !prevState;\n      if (typeof visibilityToggle === 'object') {\n        (_a = visibilityToggle.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(visibilityToggle, newState);\n      }\n      return newState;\n    });\n  };\n  const getIcon = prefixCls => {\n    const {\n      action = 'click',\n      iconRender = defaultIconRender\n    } = props;\n    const iconTrigger = ActionMap[action] || '';\n    const icon = iconRender(visible);\n    const iconProps = {\n      [iconTrigger]: onVisibleChange,\n      className: `${prefixCls}-icon`,\n      key: 'passwordIcon',\n      onMouseDown: e => {\n        // Prevent focused state lost\n        // https://github.com/ant-design/ant-design/issues/15173\n        e.preventDefault();\n      },\n      onMouseUp: e => {\n        // Prevent caret position change\n        // https://github.com/ant-design/ant-design/issues/23524\n        e.preventDefault();\n      }\n    };\n    return /*#__PURE__*/React.cloneElement( /*#__PURE__*/React.isValidElement(icon) ? icon : /*#__PURE__*/React.createElement(\"span\", null, icon), iconProps);\n  };\n  const {\n      className,\n      prefixCls: customizePrefixCls,\n      inputPrefixCls: customizeInputPrefixCls,\n      size\n    } = props,\n    restProps = __rest(props, [\"className\", \"prefixCls\", \"inputPrefixCls\", \"size\"]);\n  const {\n    getPrefixCls\n  } = React.useContext(ConfigContext);\n  const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);\n  const prefixCls = getPrefixCls('input-password', customizePrefixCls);\n  const suffixIcon = visibilityToggle && getIcon(prefixCls);\n  const inputClassName = classNames(prefixCls, className, {\n    [`${prefixCls}-${size}`]: !!size\n  });\n  const omittedProps = Object.assign(Object.assign({}, omit(restProps, ['suffix', 'iconRender', 'visibilityToggle'])), {\n    type: visible ? 'text' : 'password',\n    className: inputClassName,\n    prefixCls: inputPrefixCls,\n    suffix: suffixIcon\n  });\n  if (size) {\n    omittedProps.size = size;\n  }\n  return /*#__PURE__*/React.createElement(Input, Object.assign({\n    ref: composeRef(ref, inputRef)\n  }, omittedProps));\n});\nif (process.env.NODE_ENV !== 'production') {\n  Password.displayName = 'Password';\n}\nexport default Password;"],"mappings":"AAAA,IAAIA,MAAM,GAAG,IAAI,IAAI,IAAI,CAACA,MAAM,IAAI,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,CAAC,GAAG,CAAC,CAAC;EACV,KAAK,IAAIC,CAAC,IAAIH,CAAC,EAAE,IAAII,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAEG,CAAC,CAAC,IAAIF,CAAC,CAACO,OAAO,CAACL,CAAC,CAAC,GAAG,CAAC,EAAED,CAAC,CAACC,CAAC,CAAC,GAAGH,CAAC,CAACG,CAAC,CAAC;EAChG,IAAIH,CAAC,IAAI,IAAI,IAAI,OAAOI,MAAM,CAACK,qBAAqB,KAAK,UAAU,EAAE,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEP,CAAC,GAAGC,MAAM,CAACK,qBAAqB,CAACT,CAAC,CAAC,EAAEU,CAAC,GAAGP,CAAC,CAACQ,MAAM,EAAED,CAAC,EAAE,EAAE;IAC3I,IAAIT,CAAC,CAACO,OAAO,CAACL,CAAC,CAACO,CAAC,CAAC,CAAC,GAAG,CAAC,IAAIN,MAAM,CAACC,SAAS,CAACO,oBAAoB,CAACL,IAAI,CAACP,CAAC,EAAEG,CAAC,CAACO,CAAC,CAAC,CAAC,EAAER,CAAC,CAACC,CAAC,CAACO,CAAC,CAAC,CAAC,GAAGV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